Skip to content

Add HTTP result code to USDT milestone_sm_finish#12937

Merged
moonchen merged 1 commit intoapache:masterfrom
moonchen:usdt-add-http-result-code
Mar 25, 2026
Merged

Add HTTP result code to USDT milestone_sm_finish#12937
moonchen merged 1 commit intoapache:masterfrom
moonchen:usdt-add-http-result-code

Conversation

@moonchen
Copy link
Contributor

@moonchen moonchen commented Mar 4, 2026

No description provided.

@moonchen moonchen added this to the 10.2.0 milestone Mar 4, 2026
@moonchen moonchen requested a review from Copilot March 4, 2026 18:10
@moonchen moonchen self-assigned this Mar 4, 2026

This comment was marked as outdated.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

const HTTPStatus status_code =
t_state.hdr_info.client_response.valid() ? t_state.hdr_info.client_response.status_get() : HTTPStatus::NONE;

ATS_PROBE2(milestone_sm_finish, sm_id, static_cast<int>(status_code));
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing milestone_sm_finish from ATS_PROBE1 to ATS_PROBE2 is a USDT interface change: existing bpftrace/perf scripts that assume only arg0 (sm_id) will now see an additional arg1 (HTTP status). The repo documentation example still treats milestone_sm_finish as having a single argument (doc/developer-guide/debugging/tracing.en.rst around the bpftrace example), so it should be updated to reflect the new signature and describe arg1.

Suggested change
ATS_PROBE2(milestone_sm_finish, sm_id, static_cast<int>(status_code));
ATS_PROBE1(milestone_sm_finish, sm_id);

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example demonstrates the use of sm_id. It doesn't need to use status_code, and the bpftrace code should keep working as is.

@moonchen
Copy link
Contributor Author

moonchen commented Mar 4, 2026

[approve ci autest 0]

1 similar comment
@bryancall
Copy link
Contributor

[approve ci autest 0]

@bneradt bneradt self-requested a review March 9, 2026 22:27
@bryancall bryancall modified the milestones: 10.2.0, 11.0.0 Mar 9, 2026
@moonchen moonchen merged commit 33800d2 into apache:master Mar 25, 2026
19 checks passed
@github-project-automation github-project-automation bot moved this to For v10.2.0 in ATS v10.2.x Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: For v10.2.0

Development

Successfully merging this pull request may close these issues.

4 participants